package com.jnu.tijian.controller;

import com.jnu.tijian.domain.Orders;
import com.jnu.tijian.dto.ResponseObject;
import com.jnu.tijian.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrdersController {
    /**
     * 保存订单数据
     */
    @Autowired
    OrdersService ordersService;

    @RequestMapping("/saveOrders")
    public ResponseObject saveOrders(@RequestBody Orders orders) {
        return ordersService.saveOrders(orders);
    }
}
